package ylesanded.kimpExample;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;

abstract class Shape {
	public Color color = Color.BLUE;
	
	public boolean selected;
	
	public abstract Shape copy();
	
	protected void copyHelper(Shape s) {
		s.selected = selected;
		s.color = new Color(color.getRGB());
	}
	
	public abstract void draw(Point p);
	public abstract void move(int dx, int dy);
	
	public void paint(Graphics g) {
		if (selected) {
			g.setColor(Color.RED);
		} else {
			g.setColor(color);
		}
	}
	
	public abstract int getDistance(Point p);
}
